package com.cjjd.c.feature.mine.register;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.cjjd.c.R;
import com.cjjd.c.base.ActionBarFragment;
import com.cjjd.c.feature.mine.login.LoginActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ----------------------------------
 * Created by xyd on 2017/8/24.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class CompleteRegisterFragment extends ActionBarFragment {
    @Bind(R.id.tv_id)
    TextView tvId;

    private String id;

    @Override
    public Object getTitleString() {
        return "注册成功";
    }

    @Override
    public int getContentView() {
        return R.layout.fragment_register_complete;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        tvId.setText(id);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick(R.id.tv_next)
    public void onViewClicked() {
        Intent intent = new Intent(mContext, LoginActivity.class);
        startActivity(intent);
    }

    public void setId(String id) {
        this.id = id;
    }
}
